<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:ui="http://xmlns.jcp.org/jsf/facelets"
      xmlns:h="http://xmlns.jcp.org/jsf/html"
      xmlns:f="http://xmlns.jcp.org/jsf/core"
      xmlns:p="http://primefaces.org/ui">

    <ui:composition template="/menu.xhtml">
        <ui:define name="title">
            <h:outputText value="#{bundle.CreateDetalleventasTitle}"></h:outputText>
        </ui:define>
        <ui:define name="body">
            <p:growl id="Msn" />
            <h:form id="form" >
                <p:outputLabel value="Los campos con * son Obligatorios"/>
                <p:separator />
                <h:panelGrid columns="6">
                    <p:outputLabel value="#{bundle.CreateDetalleventasLabel_cantidad}" for="cantidad" />
                    <p:inputText id="cantidad" value="#{detalleventasController.selected.cantidad}" title="#{bundle.CreateDetalleventasTitle_cantidad}" required="true" requiredMessage="#{bundle.CreateDetalleventasRequiredMessage_cantidad}"/>
                    <p:outputLabel value="#{bundle.CreateDetalleventasLabel_ventadetalle}" for="ventadetalle" />
                    <p:selectOneMenu id="ventadetalle" value="#{detalleventasController.selected.ventadetalle}" required="true" requiredMessage="#{bundle.CreateDetalleventasRequiredMessage_ventadetalle}">
                        <f:selectItems value="#{ventasController.itemsAvailableSelectOne}"/>
                    </p:selectOneMenu>
                    <p:outputLabel value="#{bundle.CreateDetalleventasLabel_productodetalle}" for="productodetalle" />
                    <p:selectOneMenu id="productodetalle" value="#{detalleventasController.selected.productodetalle}"  required="true" requiredMessage="#{bundle.CreateDetalleventasRequiredMessage_productodetalle}">
                        <f:selectItems value="#{productosController.itemsAvailableSelectOne}"/>
                    </p:selectOneMenu>
                </h:panelGrid>
                <p:spacer/>
                
                <h:panelGrid columns="3">

                    <h:commandButton action="#{detalleventasController.create}" value="#{bundle.CreateDetalleventasSaveLink}" />

                    <h:commandButton action="#{detalleventasController.prepareList}" value="#{bundle.CreateDetalleventasShowAllLink}" immediate="true"/>

                </h:panelGrid>

            </h:form>
        </ui:define>
    </ui:composition>

</html>
